1. Field of the Invention
The field of the invention relates to data processing and in particular to reordering application code to improve processing performance.
2. Description of the Prior Art
There is a desire in data processing to increase the speed of execution of applications. Applications are generally written by a programmer, in a high level language that is easy for a person to understand. A compiler then changes this to machine code which controls a processor to perform the actions specified in the high level language by the programmer. In addition to changing the language the compiler seeks to improve performance times of the application by rearranging the code. The compiler compiles the application from a high level language in which it was written to machine code native to a particular processor that is to process the application. The compiler generally also takes account of the properties of that processor and rearranges the code to improve the execution time on the processor. The compiled application in the form of machine code may then be stored in an apparatus comprising the processor that is to process it.
Although it is clearly efficient to rearrange the code when translating it from one language to another, there may be situations where it is not possible to rearrange it with respect to the properties of a particular processor. For example, when processors are updated, they are generally backwards compatible, i.e. compatible with earlier generation processors and thus, will be able to process the applications that these earlier generation processors could process. However, their hardware configuration will be different from these earlier generation processors and thus, the applications that were compiled to run efficiently on the earlier generation processors may not run as efficiently on the later ones. Although applications could be compiled again for the new processors, there may be situations where this is not appropriate, for example where the processors are within platforms that the designers of the processors do not control such as within mobile phones. Thus, it would be desirable to be able to improve the performance of such applications without needing to recompile them.
Machine independent programming code is also known. For example java bytecode, which can be executed by any processing system using a software virtual machine running on that system. While a java virtual machine causes a processor to execute the java bytecodes the order of this bytecode is set by the java compiler and as the java compiler is generic and not machine specific, the bytecode order produced may well be sub-optimal for a particular machine.
Some hardware systems such as the ARM® 926 ejs processor can execute much of the machine independent code as native code. In such cases there is no need to compile the code, but once again the order of the code may be sub-optimal for the processor that is to process it.
It would be desirable to improve the performance of machine independent code relative to a particular machine.